package com.questetra.OAuth.apps.QuestetraBPMSuite
{
    import com.questetra.OAuth.core.OAuthService;
    
    import flash.net.URLRequestMethod;
    import flash.net.URLVariables;

    public class QBPMSService extends OAuthService
    {
        public static const REQUEST_TOKEN:String = "OAuth/requestToken";
        public static const CONFIRM_ACCESS:String = "OAuth/confirmAccess";
        public static const ACCESS_TOKEN:String = "OAuth/accessToken";
        
        public static const DATA_ALLOCATED:String = "API/PE/Workitem/listAllocated";
        
        public function QBPMSService()
        {
            super(REQUEST_TOKEN, CONFIRM_ACCESS, ACCESS_TOKEN);
        }
        
        public function getAllocatedTask(callback:Function, target:Object):void
        {
            var url_variables:URLVariables = new URLVariables();
            url_variables.mime = "JSON"; 
            super.request(URLRequestMethod.GET, this.contextPath + DATA_ALLOCATED, url_variables, callback, target);
        }
    }
}